<!DOCTYPE html>
<html>

<head>
    <title>后台</title>
    <meta charset="utf-8">
    <!-- public -->
    <link rel="stylesheet" href="<?=HW_CSS?>font.css">
    <link rel="stylesheet" href="<?=HW_CSS?>base.css">
    <link rel="stylesheet" href="<?=HW_CSS?>bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="<?=HW_CSS?>style.css">
    <link rel="stylesheet" href="<?=HW_CSS?>main_content.css">
</head>
<style>

</style>

<body>

    <form class="form-horizontal" action="<?=base_url().'Admin/AdminUser/addAdminUser';?>" method="POST">
        <!-- toolbar_container -->
        <div id="toolbar_container">
            <div class="tb_item">
                <button type="submit">保存</button>
            </div>
        </div>

        <!-- 基本信息 -->
        <div class="panel-group">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a role="button" data-toggle="collapse" href="#collapseOne">
                            基本信息
                        </a>
                    </h4>
                </div>
                <div id="collapseOne" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <div class="form-group">
                            <input type='hidden' name='id' value='<?=isset($adminuser)?$adminuser['id']:'0'?>' />
                            <input type='hidden' name='sex' value='0'>
                            <input type='hidden' name='phone' value=''>
                            <label for="" class="col-sm-2 control-label">账号<span>*</span>：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" name="account" required value="<?=isset($adminuser)?$adminuser['account']:''?>" <?php if(isset($adminuser)){echo 'readonly';} ?>>
                            </div>
                            <label for="" class="col-sm-2 control-label">姓名<span>*</span>：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" name="username" required value="<?=isset($adminuser)?$adminuser['username']:''?>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="" class="col-sm-2 control-label">角色<span>*</span>：</label>
                            <div class="col-sm-3">
                                <select name="role" class="form-control" required id="">
                                    <?php if(isset($auth)){foreach($auth as $val): ?>
                                        <option <?=isset($adminuser) && $adminuser['role'] ==$val['id'] ?'selected':''?> value="<?=$val['id']?>" ><?=$val['name']?></option>
                                    <?php endforeach; } ?>
                                </select>
                            </div>
                            <label for="" class="col-sm-2 control-label">密码<span>*</span>：</label>
                            <div class="col-sm-3">
                                <input type="password" <?=isset($adminuser)?'':'required'?> class="form-control" name="password" value="">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 权限信息 -->
        <!-- <div class="panel-group">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a role="button" data-toggle="collapse" href="#collapseTwo">
                            权限信息
                        </a>
                    </h4>
                </div>
                <div id="collapseTwo" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <div class="form-group">
                            <label for="" class="col-sm-2 control-label">权限：</label>
                            <div class="col-sm-8">
                                <div class="col-sm-12">
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('User',$adminuser['authority'])?'checked':''?> name="authority[]" value="User"> 用户中心
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('Merchant',$adminuser['authority'])?'checked':''?> name="authority[]" value="Merchant"> 商户中心
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('MerchantType',$adminuser['authority'])?'checked':''?> name="authority[]" value="MerchantType"> 服务类型管理
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('Goods',$adminuser['authority'])?'checked':''?> name="authority[]" value="Goods"> 商品服务管理
                                    </label>
                                </div>
                                <div class="col-sm-12">
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('Finace',$adminuser['authority'])?'checked':''?> name="authority[]" value="Finace"> 审批管理
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('Activity',$adminuser['authority'])?'checked':''?> name="authority[]" value="Activity"> 活动中心
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('AdminUser',$adminuser['authority'])?'checked':''?> name="authority[]" value="AdminUser"> 系统管理
                                    </label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" <?=isset($adminuser) && in_array('Orders',$adminuser['authority'])?'checked':''?> name="authority[]" value="Orders"> 订单中心
                                    </label>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </form> -->

    <script src="<?=HW_STA?>lib/require.js" data-main="<?=HW_STA?>module/setting/setting.js"></script>
</body>

</html>